package com.kasa.zto;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author gary
 * @version 1.0
 */
public class ZTOException extends Exception
{

    /**
     *
     */
    private static final long serialVersionUID = -5481806444666027931L;

    public Exception getCause()
    {
        return cause;
    }

    public String getMessage()
    {
        if (cause != null)
        {
            return cause.getMessage();
        }
        else
        {
            return super.getMessage();
        }
    }

    public ZTOException(Exception exception)
    {
        cause = exception;
    }

    public ZTOException(String s)
    {
        super(s);
    }

    protected Exception cause;
}
